<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib  prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib  prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<c:set var="ctx" value="${pageContext.request.contextPath}" />  
<!doctype html> 
<html lang="zh-CN">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
		<meta charset="utf-8"/>
		<meta http-equiv="Cache-Control" content="no-store" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		
	    <link href="${ctx}/static/css/report.css" rel="stylesheet" type="text/css" media="screen" />
	    
	</head>
	<body>
		   <form id="report_form" name="report_form" method="post" action="service.do?method=showReportUpdate">
                  <!--report的隐藏值，begin-->
                  <input type="hidden" name="reportType" value="${report.reportType}">
                  <input type="hidden" name="reportTypeCode" value="${report.reportTypeCode}">
                  <input type="hidden" name="reportId" id="reportId" value="${report.reportId}">
                  <input type="hidden" name="checkStatus" id="checkStatus" value="${report.checkStatus}">
                 <input type="hidden" name="cityName" value="${report.cityName}">
                  <input type="hidden" name="reportUserId" value="${report.reportUserId}">
                  <input type="hidden" name="reportOperatorId" value="${report.reportOperatorId}">
                  <input type="hidden" name="reportProxyId" value="${report.reportProxyId}">
                  <input type="hidden" name="reportAreaId" id="reportAreaId" value="${report.reportAreaId}">
                  <input type="hidden" name="reportUnitIndustry" value="${report.reportUnitIndustry}">
				  <input type="hidden" name="reportReferenceId" value="${report.reportReferenceId}">
                  <input type="hidden" name="reportTimetype" value="${report.reportTimetype}">
                  <input type="hidden" name="reportYear" value="${report.reportYear}">
                  <input type="hidden" name="reportMonth" id="reportMonth" value="${report.reportMonth}">
                  <input type="hidden" name="reportQuarter" id="reportQuarter" value="${report.reportQuarter}">
                  <input type="hidden" name="reportYearTime" value="${report.reportYearTime}">
                  <input type="hidden" name="reportVersion" value="${report.reportVersion}">
                  <input type="hidden" name="reportUnitIndustryId" value="${report.reportUnitIndustryId}">
                  <input type="hidden" name="reportTypeId" id="reportTypeId" value="${report.reportTypeId}">
                  <input type="hidden" name="reportEdition" value="${report.reportEdition}">
                  <input type="hidden" name="errorCode" id="errorCode" value="0" />
                  <input type="hidden" name="reportUnit"  value="${report.reportUnit }" />
                <!--report的隐藏值，end-->
		   
		   		<div class="">
		   			${reportTemplate}
					<div>
					<table id="remark-table" width="100%" border="0">
							<tr>
					           <td> 
					       			备注：
					        	</td>
					        	<td>
					           	  <!-- 1:企业提交省区未审核    5:省审核通过企业上报提交总局    55:省级待通过企业上报提交总局     33:省级待驳回企业上报        66:总局待审核通过        77:总局待驳回 -->
					           	  <c:if test="${(report.checkStatus == '1' or  report.checkStatus == '5' or report.checkStatus == '55' or report.checkStatus == '33' or report.checkStatus == '66' or report.checkStatus == '77') }">
					           	  	审核意见：
					           	  </c:if> 
					              <!-- 3:省驳回企业上报          7:总局驳回 -->
					              <c:if test="${report.checkStatus == '3'  or report.checkStatus == '7'}" >
					              	审核意见：
					              </c:if>
					        		
					        	</td>
					       </tr>
					         <tr>
					       		<td><textarea name="reportRemark" readonly="readonly">${report.reportRemark }</textarea></td>
					           <td>
					           	  <!-- 1:企业提交省区未审核    5:省审核通过企业上报提交总局    55:省级待通过企业上报提交总局     33:省级待驳回企业上报        66:总局待审核通过        77:总局待驳回 -->
					           	  <c:if test="${(report.checkStatus == '1' or  report.checkStatus == '5' or report.checkStatus == '55' or report.checkStatus == '33' or report.checkStatus == '66' or report.checkStatus == '77')  }">
					           	  	<textarea id="checkComment" name="checkComment" readonly="readonly">${report.checkComment }</textarea>
					           	  </c:if>
					              <!-- 3:省驳回企业上报          7:总局驳回 -->
					              <c:if test="${report.checkStatus == '3'  or report.checkStatus == '7'}" >
					              	<textarea id="checkComment" name="checkComment" readonly="readonly">${report.checkComment }</textarea>
					              </c:if>   
					           </td>
					       </tr>
					        <tr>
					          <td align="center" colspan="2">
								<input type="hidden" name="commit" id="commit" value="0"/>
								<input type="button"  id="print_button" class="button_01_lef" value="打印" />
								   <c:if test="${runMode=='LAN'}">
					              	<input type="button"  name="showDetailProButton" class="button_01_lef" id="showDetailButton" value="汇总详情" />
							        </c:if>
							       </td>
					        </tr>
					      </table>
					</div>			   				
		   			
		   		</div>
		   </form>		
		      <div id="showDetailCon"></div>
	</body>
<script  type="text/javascript" src="${ctx}/static/jquery/jquery-1.8.3.js"></script>
<script  type="text/javascript" src="${ctx}/static/jquery-print-area/jquery.PrintArea.js"></script>
<script  type="text/javascript" src="${ctx}/static/jquery-validation/jquery.validate.js"></script>
<script  type="text/javascript" src="${ctx}/static/jquery-validation/messages_zh.js"></script>
<script language="javascript" src="${ctx}/static/LodopFuncs.js"></script>
<script type="text/javascript" src="${ctx}/static/print.js"></script>
<script type="text/javascript">
	$('#report-body td input[type="text"]').each(function(i){
		var thisVal = $(this).val();
		$(this).parent().empty().text(thisVal);
	});
	
	$('#report-body td[indicator-input-type="select"]').each(function(i){
		var selectVal = $(this).find('select').val();
		$(this).empty().text(selectVal);
	});
	$('#report-body td[indicator-input-type="radio"]').each(function(i){
		var checkedVal = $(this).find('input:checked').val();
		$(this).empty().text(checkedVal);
	});
	
	$('#report-body td[indicator-input-type="checkbox"]').each(function(i){
		var checkedVal = '';
		$(this).find('input:checked').each(function(){
			checkedVal += $(this).val() + ' ';
		});
		$(this).empty().text(checkedVal);
	});
	
	$('#add-report-body-row-btn').parent().remove();
	
	$('#report-foot td input[type="text"]').each(function(i){
		var thisVal = $(this).val();
		$(this).parent().empty().text(thisVal);
	});
	
	$('#showDetailButton').on('click',function(){
		var param = {
			'areaId'	: $('#reportAreaId').val(),
			'timeDate' : $('#reportMonth').val(),
			'quarterDate' : $('#reportQuarter').val(),
			'reportTypeId' : $('#reportTypeId').val()
		};
		$.post('service.do?method=generelReportsDetail',param).done(function(data){
			$('#showDetailCon').html(data);
		}).fail(function(){
			alert('error');
		});
	});
</script>
</html>
    